import React, { Component } from 'react'
import { Row, Col } from 'antd';
import HomeTop from './HomeTop'
import HomeMiddle from './HomeMiddle'
import HomeBottom from './HomeBottom'
import { otherReportStats } from './services';

const Home = () => {
  const [data, setData] = React.useState()

  React.useEffect(() => {
    getReportStats()
  }, [])

  const getReportStats = async () => {
    let res = await otherReportStats({})
    console.log('首页其他报表统计', res);
    setData(res.body)

  }

  return (
    <Row gutter={[16, 16]}>
      <Col span={24}>
        <HomeTop data={data} />
      </Col>
      <Col span={24}>
        <HomeMiddle data={data} />
      </Col>
      <Col span={24}>
        <HomeBottom />
      </Col>
    </Row>
  )
}

export default Home;
